import { defineConfig } from 'vite'
import reactRefresh from '@vitejs/plugin-react-refresh'
import { resolve } from 'path'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [reactRefresh()],
  resolve: {
    alias: [
      { find: '~', replacement: resolve(__dirname, '/node_modules') },
      { find: '@', replacement: resolve(__dirname, 'src') },
      {
        find: '@components',
        replacement: resolve(__dirname, 'src/components'),
      },
      { find: '@models', replacement: resolve(__dirname, 'src/models') },
      { find: '@views', replacement: resolve(__dirname, 'src/views') },
    ],
  },
  server: {
    port: 3050,
  },
})
